home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / pbc32.zip / PBC$BAS.ZIP / SHUFFLES.BAS < prev    next >
BASIC Source File  |  1996-04-10  |  646b  |  17 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |   PBClone  (C) Copyright 1996 Charon Software, All Rights Reserved   |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. DECLARE FUNCTION RndI% (TopValue%)
  8.  
  9. SUB ShuffleSt (St$)
  10.    FOR tmp% = 1 TO LEN(St$)
  11.       posn% = RndI%(LEN(St$)) + 1
  12.       ch$ = MID$(St$, tmp%, 1)
  13.       MID$(St$, tmp%, 1) = MID$(St$, posn%, 1)
  14.       MID$(St$, posn%, 1) = ch$
  15.    NEXT
  16. END SUB
  17.